from pydantic import BaseModel
from typing import List, Dict, Optional

class UploadResponse(BaseModel):
    status: str
    processed_files: List[str]
    error_files: List[str] = []
    message: Optional[str] = None

class QueryRequest(BaseModel):
    question: str
    use_llm: bool = True
    top_k: int = 5

class QueryResponse(BaseModel):
    answer: Optional[str]
    references: List[Dict]
    cost: float = 0.0

class ChunkUpdateRequest(BaseModel):
    content: str
    metadata: Dict = {}